<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-sizes="[10, 20, 30, 40]"
    :page-size="pageSize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  />
</template>

<script>
export default {
  name: 'PaginationIndex',
  props: {
    total: {
      type: Number,
      default: 0
    },
    currentPage: {
      type: Number,
      default: 1
    },
    pageSize: {
      type: Number,
      default: 10
    }
  },
  methods: {
    handleSizeChange(size) {
      this.$emit('pageSizeChange', size);
    },
    handleCurrentChange(page) {
      this.$emit('currentPageChange', page);
    }
  }
};
</script>